# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul"
;doubcp.gul (TopSpin 2.0)

;basic double cp experiment
;cross polarise from H to Y, then from Y to X
;using LG proton offset during Y-X transfer
;written by HF 1.3.2001 modified by GuL 05.05.2009
;for correct phase and 2 decouplings

;Avance II+ version
;parameters:
;p3 : proton 90 at power level pl12
;p15 : contact time at pl1 (f1) and pl2 (f2)
;p16 : X-Y contact time, spnam1 square or ramp, pl5 is Y contact pulse power
;d1 : recycle delay
;pl1 : X power level
;sp0 : proton power level during contact
;pl2 : =120dB, not used
;pl3 : Y power level (for H to Y CP)
;pl5 : Y power level for Y to X CP
;p3 : H 90 degree pulse
;spnam0 : file name for variable amplitude CP
;spnam1 : file name for Y to X CP shape
;pl12 : power level for H 90 and standard proton decoupling 
;pl13 : e.g. used in tppm13
;cpdprg2 : sequence used for decoupling (tppm15, cw, etc.)
;pcpd2 : pulse length in decoupling sequence
;d0 : =0 for 1D, 0.3u for initial t1 period in 2D
;in0 : = 1/swh(f1)
;FnMode : TPPI, States or States-TPPI
# 31 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul"
;$COMMENT=basic double cp experiment
;$CLASS=Solids
;$DIM=1D
;$TYPE=cross polarisation
;$SUBTYPE=simple 1D

;$OWNER=Bruker
;cnst11 : to adjust t=0 for acquisition, if digmod = baseopt
"acqt0=1u*cnst11"
"d0=0.3u"

# 1 "mc_line 42 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul exp. def. part of mc cmd. before ze"
; dimension 1D; AQ_mode 
define delay MCWRK
define delay MCREST
"MCREST = 10m - 0.500000*10m"
"MCWRK = 0.500000*10m"

    dccorr
# 42 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul"
1 ze
# 1 "mc_line 42 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul exp. def. of mc cmd. after ze"
# 43 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul"
# 1 "mc_line 43 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul exp. start label for mc cmd."
2 MCWRK
  MCREST
# 44 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul"
  d1 do:f2
# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/p15_prot.incl" 1
;p15_prot.incl
;avance-version (13/01/29)
;Test the rf on-time and duty cycle
;protect against too long contact time
;Test the rf on-time and duty cycle 
;
;$CLASS=Solids INCL
;$COMMENT=protect against too long contact time


1m
if "p15 < 10.1m" goto Passp15
2u
print "contact time exceeds 10msec limit!"
goto HaltAcqu
Passp15, 1m
# 20 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/p15_prot.incl"
;$Id: p15_prot.incl,v 1.8 2013/01/29 15:40:14 ber Exp $
# 46 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul" 2
				;make sure p15 does not exceed 10 msec 
				;let supervisor change this pulseprogram if 
				;more is needed

# 1 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/aq_prot.incl" 1
;aq_prot.incl
;avance-version (13/01/28)
;Test the rf on-time and duty cycle
;protect against too long acquisition time

;$CLASS=Solids INCL
;$COMMENT=protect against too long acquisition time
# 9 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/aq_prot.incl"
1m
if "aq < 50.1m" goto Passaq
2u 
print "acquisition time exceeds 50m limit!"
goto HaltAcqu
Passaq, 1m

;$Id: aq_prot.incl,v 1.8 2013/01/28 17:39:02 ber Exp $
# 50 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul" 2
				;allows max. 50 msec acquisition time, supervisor
				;may change  to max. 1s at less than 5 % duty cycle
				;and reduced decoupling field
  (p3 pl12 ph1):f2
  (p15 pl3 ph2):f3 (p15:sp0 ph10):f2
  1u cpds3:f2
  d0 
  (p16 pl1 ph4):f1 (p16:sp1 ph3):f3 
  1u cpds2:f2
  go=2 ph31
  1m do:f2 
# 1 "mc_line 61 file /opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul exp. mc cmd. in line"
  MCWRK  wr #0
# 62 "/opt/topspin3.7.0/exp/stan/nmr/lists/pp/user/doubcp.gul"
HaltAcqu, 1m
exit

ph0= 0
ph1= 1 3 
ph2= 0 
ph3= 0 0 2 2
ph4= 0 0 0 0 1 1 1 1 
     2 2 2 2 3 3 3 3
ph10= 0
ph31= 3 1 1 3 0 2 2 0
      1 3 3 1 2 0 0 2
